﻿﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=yes">
    <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>商家自检</title>

    <link rel="stylesheet" type="text/css" href="${ctxStatic}/ajz/mobile/css/iconfont.css">
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/sf.css" />

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
    <style type="text/css">
    </style>
</head>
<body>
<form action="UnbindByOpenid" method="post" id="index">
<div class="staff3_link_box">

<div class="e_querycontent" style="margin-top: 10px">
    <div class="e_q_c_left">
        <ul>
            <h5><img src="${ctxStatic}/ajz/mobileimg/xinxi.png"><b>单位信息</b><span
                    class="color_title2"></span></h5>
            <li><i>单位名称：</i><b>${ajzCompanyInfo.enterpriseNum}</b></li>
                <li><i>负责人：</i><b><a class="aline" class="sa_line"> ${ajzCompanyInfo.legalPerson}</a></b></li>
            <li><i>联系电话：</i><b> ${ajzCompanyInfo.legalPersonTel}</b></li>
            <li><i>所在地址：</i><b><a href="" class="sa_line">${ajzCompanyInfo.addr}</a></b></li>

        </ul>
    </div>
    <div class="hi_degbtnbar">
        <a  class="xgbtn_1" id="checkRecord" onclick="checkRecord();">检查记录</a>
        <a id="selfCheck" onclick="selfcheck();" class="xgbtn_1">自检</a>
        <a id="selfCheck" onclick="jiebang(); " class="xgbtn_1">解绑</a>
    </div>
</div>
</form>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/scan.js"></script>
<script>
    function selfcheck(){
        //获取a标签的value值
        var status = $("#status").val();
        var checkId = $("#checkId").val();
        var userId = $("#userId").val();
        var ajzType = $("#ajzType").val();
        if(checkId == null || checkId ==''){
            alert("等待工作人员检查");
        }else if(status=='3,0,0,0,0,0,0'){
            alert("等待工作人员复查");
        }else{
            location.href='fuchaEdit1?checkId='+checkId+'&userId='+userId+'&ajzType='+ajzType+'&action=self_inspect&iswork=no';
        }
    }

    function checkRecord(){
        //获取a标签的value值
        var openid = $("#openid").val();
        var checkId = $("#checkId").val();
        if(checkId == null || checkId ==''){
            alert("暂无检查记录");
        }else{
            location.href='selfCheckRecord?openid='+openid+'&action=selfInspection';
        }
    }
</script>
    <script>//解绑链接


    //点击按钮解绑
    function UnbindByOpenid() {
        var url = "/a/ajz/ajzCompanyInfo/UnbindByOpenid";
        var unbind = confirm("真的确定要解绑吗？");
        var openid = $("#openid").val();
        if(unbind){
            $.ajax({
                url:url,
                type:"POST",
                data:"openid="+openid,
                dateType:"json",
                success:function(map){
                    var s = map.xx
                    alert(s)
                    if(s.eq("成功")){
                        location.href="/jeesite/a/ajz/ajzCompanyInfo/wechatIndex";
                        return;
                    }

                }

            })
        }

    }
    function jiebang(){
        var form2 = document.getElementById("index");
        alert("是否确定解绑")
        form2.submit();//form表单提交
    }
    </script>

</body>
</html>
